package com.my.zl.common.dto.tree;

import java.io.Serializable;
import java.util.List;

/**
 * zTree模型
 * @author zhouliang
 *
 */

public class Ztree implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private String id;
	private String name;
	private boolean open = true;// open,closed
	private boolean checked = false;
	private List<Ztree> children;
	private String icon;
	private String pId;
	private boolean chkDisabled = false;  //单选框不可选

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isOpen() {
		return open;
	}

	public void setOpen(boolean open) {
		this.open = open;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public List<Ztree> getChildren() {
		return children;
	}

	public void setChildren(List<Ztree> children) {
		this.children = children;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getpId() {
		return pId;
	}

	public void setpId(String pId) {
		this.pId = pId;
	}

	public boolean isChkDisabled() {
		return chkDisabled;
	}

	public void setChkDisabled(boolean chkDisabled) {
		this.chkDisabled = chkDisabled;
	}
	
	
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof Ztree) {
			Ztree t = (Ztree) obj;
			return t.getId().equals(this.getId());
		}
		return false;
	}
	
}
